<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.29
     from novice.tnf on 19 December 2010 -->

<TITLE>Guide for New Eli Users - Customizing Eli's Behavior</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000" BACKGROUND="gifs/bg.gif">
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0" VALIGN=BOTTOM>
<TR VALIGN=BOTTOM>
<TD WIDTH="160" VALIGN=BOTTOM>
<A HREF="http://eli-project.sourceforge.net/">
<IMG SRC="gifs/elilogo.gif" BORDER=0>
</A>&nbsp;
</TD>
<TD WIDTH="25" VALIGN=BOTTOM>
<img src="gifs/empty.gif" WIDTH=25 HEIGHT=25>
</TD>
<TD ALIGN=LEFT WIDTH="475" VALIGN=BOTTOM>
<A HREF="index.html"><IMG SRC="gifs/title.png" BORDER=0></A>
</TD>
<!-- |DELETE FOR SOURCEFORGE LOGO|
<TD>
<a href="http://sourceforge.net/projects/eli-project">
<img
  src="http://sflogo.sourceforge.net/sflogo.php?group_id=70447&amp;type=13"
  width="120" height="30"
  alt="Get Eli: Translator Construction Made Easy at SourceForge.net.
    Fast, secure and Free Open Source software downloads"/>
</a>
</TD>
|DELETE FOR SOURCEFORGE LOGO| -->
</TR>
</TABLE>

<HR size=1 noshade width=785 align=left>
<TABLE BORDER=0 CELLSPACING=2 CELLPADDING=0>
<TR>
<TD VALIGN=TOP WIDTH="160">
<h4>General Information</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="index.html">Eli: Translator Construction Made Easy</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="gindex_1.html#SEC1">Global Index</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="faq_toc.html" >Frequently Asked Questions</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ee.html" >Typical Eli Usage Errors</a> </td></tr>
</table>

<h4>Tutorials</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="EliRefCard_toc.html">Quick Reference Card</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="novice_toc.html">Guide For new Eli Users</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="news_toc.html">Release Notes of Eli</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="nametutorial_toc.html">Tutorial on Name Analysis</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="typetutorial_toc.html">Tutorial on Type Analysis</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ee.html" >Typical Eli Usage Errors</a> </td></tr>
</table>

<h4>Reference Manuals</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ui_toc.html">User Interface</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="pp_toc.html">Eli products and parameters</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lidoref_toc.html">LIDO Reference Manual</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ee.html" >Typical Eli Usage Errors</a> </td></tr>
</table>

<h4>Libraries</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lib_toc.html">Eli library routines</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="modlib_toc.html">Specification Module Library</a></td></tr>
</table>

<h4>Translation Tasks</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lex_toc.html">Lexical analysis specification</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="syntax_toc.html">Syntactic Analysis Manual</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="comptrees_toc.html">Computation in Trees</a></td></tr>
</table>

<h4>Tools</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lcl_toc.html">LIGA Control Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="show_toc.html">Debugging Information for LIDO</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="gorto_toc.html">Graphical ORder TOol</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="fw_toc.html">FunnelWeb User's Manual</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ptg_toc.html">Pattern-based Text Generator</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="deftbl_toc.html">Property Definition Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="oil_toc.html">Operator Identification Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="tp_toc.html">Tree Grammar Specification Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="clp_toc.html">Command Line Processing</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="cola_toc.html">COLA Options Reference Manual</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="idem_toc.html">Generating Unparsing Code</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="mon_toc.html">Monitoring a Processor's Execution</a> </td></tr>
</table>

<h4>Administration</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="sysadmin_toc.html">System Administration Guide</a> </td></tr>
</table>

<HR WIDTH="100%">
<A HREF="mailto:eli-project-users@lists.sourceforge.net">
<IMG SRC="gifs/button_mail.gif" BORDER=0 ALIGN="left"></A>
<A HREF="index.html"><IMG SRC="gifs/home.gif" BORDER=0 ALIGN="right"></A>

</TD>
<TD VALIGN=TOP WIDTH="25"><img src="gifs/empty.gif" WIDTH=25 HEIGHT=25></TD>

<TD VALIGN=TOP WIDTH="600">
<H1>Guide for New Eli Users</H1>
<P>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="novice_2.html"><IMG SRC="gifs/prev.gif" ALT="Previous Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="novice_4.html"><IMG SRC="gifs/next.gif" ALT="Next Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="novice_toc.html"><IMG SRC="gifs/up.gif" ALT="Table of Contents" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT="">
<HR size=1 noshade width=600 align=left>
<H1><A NAME="SEC18" HREF="novice_toc.html#SEC18">Customizing Eli's Behavior</A></H1>
<P>
All derived objects are stored in a directory called the
<DFN>derived object cache</DFN>,
<A NAME="IDX242"></A>
or simply the <DFN>cache</DFN>.
<A NAME="IDX243"></A>
The cache also contains a database that stores the <DFN>depends</DFN>
relationship between the output and input files of a tool run, and the
<DFN>contains</DFN> relationship between a list and its elements.
Many of the ways of customizing Eli involve various aspects of the
derived object cache.
<P>
Eli can also be used non-interactively, and can be customized by defining
shortcuts for frequently-used derivations.
<P>
<H2><A NAME="SEC19" HREF="novice_toc.html#SEC19">Hints on Cache Management</A></H2>
<P>
The default location for the cache is a directory named <CODE>.ODIN</CODE>
in the user's home directory.
A non-default cache location can be specified
by the <CODE>$ODIN</CODE> environment variable,
or with an option on the command line.
The main reasons for specifying a non-default location for
the cache are to share a common cache with other users,
or to locate the cache on a local disk for more efficient access
to derived files.
<P>
An Eli session is begun by giving the following command:
<A NAME="IDX245"></A>
<A NAME="IDX246"></A>
<A NAME="IDX244"></A>
<P>
<PRE>
eli [ -c <VAR>cache</VAR> ] [ -r | -R ]
</PRE>
<P>
All of the command line arguments are optional, and all affect the cache:
<P>
<DL COMPACT>
<A NAME="IDX247"></A>
<DT><CODE>-c <VAR>cache</VAR></CODE>
<DD>Use the directory <VAR>cache</VAR> as the cache.
<P>
<A NAME="IDX248"></A>
<DT><CODE>-r</CODE>
<DD>Reset the cache.
This deletes all derived objects currently stored in the cache.
<P>
<A NAME="IDX249"></A>
<DT><CODE>-R</CODE>
<DD>Reset the cache and upgrade all tools.
This deletes all derived objects currently stored in the cache,
and also installs the most recent versions of all tools.
</DL>
<P>
Cache directories may also be deleted using normal Unix commands
whenever they are not being used by active Eli sessions.
If the specified cache does not exist when the <CODE>eli</CODE> command is given,
then it will be created and the most recent versions of all tools
installed.
<P>
There is no limit to the number of cache directories that may exist at one time.
You might choose to have a separate cache
<A NAME="IDX251"></A>
<A NAME="IDX250"></A>
for each project you are working on, or you might choose to have a single cache
<A NAME="IDX252"></A>
to hold information for all of your projects.
If you choose multiple caches, each can be smaller than the cache you would use
for all projects.
When a project is complete, you can delete all the intermediate objects relating
to it by deleting the cache directory for that project.
<P>
Cache contents are architecture dependent, so it is not possible to
create a cache on one architecture and then
use that same cache on a different architecture.
In order to avoid this error, Eli creates a separate subdirectory of the
cache directory for each <EM>host</EM> (not architecture) on which it is
invoked.
This behavior is unpleasant in a setting where there is a pool of hosts,
all of which have the same architecture, running with a common file server.
If the environment variable <CODE>ODINVIEW</CODE> is set, Eli uses the
subdirectory name specified by that variable.
(The subdirectory names can be anything; using the host name is simply
convenient.)
<P>
The default inter-process communication mechanism 
for the odin cache manager process is TCP/IP.  
If TCP/IP is not available,
set the environment variable <CODE>$ODIN_LOCALIPC</CODE>
and Unix domain sockets will be used instead.
<P>
<H2><A NAME="SEC20" HREF="novice_toc.html#SEC20">Hints on Session Management</A></H2>
<P>
There are two kinds of Eli sessions -- interactive
<A NAME="IDX254"></A>
<A NAME="IDX253"></A>
and non-interactive.
<A NAME="IDX255"></A>
Interactive sessions are used when the requests being made are ones that Eli
can satisfy quickly, and actions by the user are necessary between requests.
During initial development of a specification,
when specification errors prevent Eli from completely satisfying the request,
interactive sessions are very fruitful:
The user makes a request,
errors are reported,
the user corrects the errors and
makes the request again.
<P>
One important decision that must be made for either kind of session is the
amount of information that should be provided to the user during that session.
<A NAME="IDX256"></A>
(Of course if the session is interactive, this decision can be changed
during the session itself by making appropriate requests.)
Eli is capable of describing at great length what it is doing at any given
moment.
Since the purpose of Eli is to suppress the details of the process needed to
satisfy your request, you will probably not want Eli to report those details to
you.
The Eli variable <CODE>LogLevel</CODE>
<A NAME="IDX257"></A>
controls the level at which Eli describes the actions that it is taking.
The default is <CODE>LogLevel=2</CODE>.
For more information about the effect of different <CODE>LogLevel</CODE> values,
give the Eli request <CODE>LogLevel=?</CODE>.
(This is an example of an Eli help request,
<A NAME="IDX258"></A>
described in  <A HREF="ui_8.html#SEC25">The Help Facility of User Interface</A>.)
<P>
The value of the environment variable <CODE>EDITOR</CODE>
<A NAME="IDX259"></A>
at the time the Eli session starts is the command that is invoked
when the character <KBD>&#60;</KBD> ends an input line.
(If <CODE>EDITOR</CODE> is not defined when the Eli session starts then <CODE>vi</CODE>
is assumed.)
That value can be changed at any time during the session by assigning to
the environment variable <CODE>EDITOR</CODE>:
<P>
<PRE>
-&#62; EDITOR=!emacsclient
</PRE>
<P>
(Note the use of <KBD>!</KBD> to indicate that the assignment is to an
environment variable rather than to an Eli variable.)
<P>
You may wish to make your selection of an editor dependent on some property
of the environment.
A typical situation is to use one editor when seated at a workstation and 
another when logged in remotely.
In this case, create a script <TT>`my_editor'</TT> that tests the appropriate
environment variables, decides what editor to use, and invokes it.
Then set the value of the environment variable <CODE>EDITOR</CODE> to
<TT>`my_editor'</TT>.
<P>
Users of Gnu Emacs
<A NAME="IDX260"></A>
who invoke Emacs only once per login session
(i.e. in a window that is always present) can
use the server capability of Emacs.
To do this, execute the command
<CODE>M-x server-start</CODE> in your Emacs session and use
<CODE>emacsclient</CODE> as the value of the environment variable <CODE>EDITOR</CODE>.
(You will also need to make sure that
the <CODE>etc</CODE> directory in your Emacs distribution is on your
<CODE>PATH</CODE>.)
Once
this is done, Eli editor invocations will use buffers in your Emacs
session.
A common way of utilizing this capability is to invoke Eli
from a sub-shell of your Emacs (created using <CODE>M-x shell</CODE>).
<P>
Eli consults file <TT>`Odinfile'</TT>
<A NAME="IDX261"></A>
in the current directory for information about the task at hand.
<TT>`Odinfile'</TT> is used to define one or more <DFN>targets</DFN>.
<A NAME="IDX262"></A>
Each target defines some product that can be requested,
using the notation <VAR>target</VAR> <CODE>==</CODE> <VAR>odin-expression</VAR>.
Here are examples of the three common kinds of target:
<P>
<DL COMPACT>
<A NAME="IDX263"></A>
<DT><CODE>mkhdr == sets.specs :exe</CODE>
<DD><CODE>mkhdr</CODE> is a <DFN>file target</DFN>.
<A NAME="IDX264"></A>
This line specifies that <CODE>mkhdr</CODE> should always be equal to the derived
file object <CODE>sets.specs :exe</CODE>.
If the command <CODE>eli mkhdr</CODE>
is given in a directory with a file <TT>`Odinfile'</TT> containing this line,
it will result in a non-interactive Eli session guaranteeing that
file <CODE>mkhdr</CODE> in this directory is up to date.
(The same effect can be obtained in an interactive session by
responding to the <CODE>-&#62;</CODE> prompt with
<CODE>mkhdr</CODE>.)
 
<A NAME="IDX265"></A>
<DT><CODE>%results == input +cmd=(mkhdr) :stdout</CODE>
<DD><CODE>%results</CODE> is a <DFN>virtual target</DFN>.
<A NAME="IDX266"></A>
A virtual target is simply a name for an odin-expression, and can be used
wherever and odin-expression is required.
If the command <CODE>eli</CODE> <CODE>'%results&#62;'</CODE>
is given in a directory with a file <TT>`Odinfile'</TT> containing this line,
it will result in a non-interactive Eli session guaranteeing that
the derived object <CODE>input +cmd=(mkhdr) :stdout</CODE> is up to date,
and writing the content to the standard output.
(The same effect can be obtained in an interactive session by
responding to the <CODE>-&#62;</CODE> prompt with <CODE>%results&#62;</CODE>.)
<P>
<A NAME="IDX267"></A>
<DT><CODE>%test ! == . +cmd=diff (%results) (result) :run</CODE>
<DD><CODE>%test</CODE> is an <DFN>executable target</DFN>.
<A NAME="IDX268"></A>
An executable target is a target that is executable.
If the command <CODE>eli %test</CODE>
is given in a directory with a file <TT>`Odinfile'</TT> containing this line,
it will result in a non-interactive Eli session guaranteeing that
the derived object <CODE>input +cmd=(mkhdr) :stdout</CODE> (named
<CODE>%results</CODE>) is up to date,
and executing the <CODE>diff</CODE> command with this object and the file
<TT>`result'</TT> from the current directory as arguments.
Execution will take place in the current directory.
(The same effect can be obtained in an interactive session by
responding to the <CODE>-&#62;</CODE> prompt with <CODE>%test</CODE>.)
</DL>
<P>
<HR size=1 noshade width=600 align=left>
<P>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="novice_2.html"><IMG SRC="gifs/prev.gif" ALT="Previous Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="novice_4.html"><IMG SRC="gifs/next.gif" ALT="Next Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="novice_toc.html"><IMG SRC="gifs/up.gif" ALT="Table of Contents" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT="">
<HR size=1 noshade width=600 align=left>
</TD>
</TR>
</TABLE>

</BODY></HTML>
